package day240525.wrapper_class_demo;

public class StringTest2 {
    @SuppressWarnings({"all"})
    public static void main(String[] args) {
        final String s1="java";
        String s2="a";
        String s3="javaa";
        String s4="java"+"a";
        String s5=s1+"a";
        String s6="java"+s2;
        String s7=s1+s2;
        System.out.println(s3==s4);
        System.out.println(s3==s5);
        System.out.println(s3==s6);
        System.out.println(s3==s7);
        System.out.println(s4==s5);
        System.out.println(s5==s6);
        System.out.println(s6==s7);
        String s8=s6.intern();//主动走常量池
        System.out.println(s3==s8);
    }
}
